package com.ruan.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ruan.entity.Orders;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruan.entity.R;
import com.ruan.query.OrdersQuery;

import java.util.List;

/**
* @author 59499
* @description 针对表【orders】的数据库操作Service
* @createDate 2023-09-14 12:59:21
*/
public interface OrdersService extends IService<Orders> {

    R<String> addOrder(String skuOptions, String userId, Integer addressId, Integer spuId,int num);

    R<Orders> getOrderById(String id);

    Orders getOrderByOutTradeNo(String outTradeNo);

    R<List<Orders>> getOrdersListByUserId(String userId);

    R<Void> deleteOrdersById(String id);

    R<IPage<Orders>> getAllOrders(OrdersQuery ordersQuery);
}
